\name{ar2PM}
\alias{ar2PM}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{From Autoregressive coefficent matrix to polynomial}
\description{
Converts a multivariate autoregression array to a matrix of polynomials.}
\usage{
ar2PM(model)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
  \item{model}{
An list with a item \code{model$ar} that is a 3-dimensional array whose 1st dimension is the lag order, so that \code{model$ar[i,,]} is the ith matrix of the autoregression.}
}
\details{
%%  ~~ If necessary, more details than the description above ~~
}
\value{
A polynomial matrix.
}
\references{
%% ~put references to the literature/web site here ~
}
\author{
%%  ~~who you are~~
}
\note{
%%  ~~further notes~~
}

%% ~Make other sections like Warning with \section{Warning }{....} ~

\seealso{
%% ~~objects to See Also as \code{\link{help}}, ~~~
}
\examples{
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (model) 
{
    p = dim(model$ar)[1]
    n = dim(model$ar)[2]
    PHI = zeroPM(n, n)
    d = diag(n)
    for (i in 1:n) {
        for (j in 1:n) {
            set(PHI, i, j) <- polynomial(c(d[i, j], -model$ar[, 
                i, j]))
        }
    }
    return(PHI)
  }
}
% Add one or more standard keywords, see file 'KEYWORDS' in the
% R documentation directory.
\keyword{ ~kwd1 }
\keyword{ ~kwd2 }% __ONLY ONE__ keyword per line
